<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1 , minimum-scale=1.0,maximum-scale =1.0,user-scalable=no">

<!--<base href="http://sc.zjheyin.com:80/wxheyin/">-->
<title>我的分享</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link rel="stylesheet" href="../css/paging.css" />
<script type="text/javascript" src="../js/jquery-1.8.3.js" ></script>
<script type="text/javascript" src="../js/query.js" ></script>
<script type="text/javascript" src="../js/paging.js" ></script>
<link rel="stylesheet" type="text/css" href="../css/wallet.css">

</head>
<style>
	h3{margin: 1em auto; text-align: center;}
	table{width: 94%; margin-left: 3%; text-align: center; font-size: 14px; margin-top: 1em;}
	table td,table th{border: 1px solid #007aff;}
	h4{margin-left: 1em; margin-top: 1em;}
	#GWPAGE ul{margin: 1em auto; margin-left: 5%; width: 80%;}
</style>

<body>
	<table>
		<thead>
		<tr>
			<th>昵称</th>
			<th>是否有效</th>
		</tr>
		</thead>
		<tbody id="order_list">

		</tbody>
	</table>
	<div id="GWPAGE"></div>
</body>
<script>
	var openID;
	$(function(){
		openID = localStorage.getItem("ll_openID");
		var start = 0, limit = 10;				
        var pageCount = getOrderList(start,limit);		     
        $('#GWPAGE').Paging({pagesize:limit,count:pageCount,toolbar:false,callback:function(page,size,count){
        	getOrderList((page-1)*limit,size);
        }});
	});

	function getOrderList(start,limit) {
		var pageCount;
           $.ajax({
           	url : '../llPay/account',
               type : "post",
               async : false,
               data : {
               	'openID' : openID,
               	'start' : start,
               	'limit' : limit
               },
            success: function(res){
                var data = res.list;
                pageCount = res.count;
                $("#order_list").empty();
                var str = '';
                for(var i in data){
                    str += '<tr>';
                    str += '    <td>' + data[i].nickName + '</td>';
                    if(data[i].totalFee > 5000){
                 	   str += '<td style="color:red;">有效</td>';
                    }else{
                 	   str += '<td>无效</td>';
                    }
                    str += '</tr>';
                }
                $("#order_list").html($(str));
            },
            error: function(){
                alert('获取记录失败！');
            }
        });
        return pageCount;
    }
</script>
</html>